﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MemberImageList.ascx.cs" Inherits="SocialFront.Web.usercontrols.Gallery.MemberImageList" %>

<%@ Register src="../Shared/TagsList.ascx" tagname="TagsList" tagprefix="sf" %>

<asp:ListView ID="lvImages" runat="server" OnPagePropertiesChanging="lvImage_PagePropertiesChanging">

    <LayoutTemplate>
        <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
    </LayoutTemplate>

    <ItemTemplate>
        <h3>
          <a href="<%# ((SocialFront.Entities.Image)Container.DataItem).PageUrl %>">
            <%#((SocialFront.Entities.Image)Container.DataItem).Title%>
          </a>
        </h3>

        <a href="<%# ((SocialFront.Entities.Image)Container.DataItem).PageUrl %>">
          <img src="/extensions/ImageScale.ashx?ImgFile=<%#((SocialFront.Entities.Image)Container.DataItem).Media.FilePath %>&amp;width=200&amp;height=200&amp;constrain=1" />
        </a>

        <sf:TagsList ID="TagsList1" runat="server" Tags="<%# ((SocialFront.Entities.Image)Container.DataItem).Tags %>" />

        <p>
          <b>
            <a href="<%# ((SocialFront.Entities.Image)Container.DataItem).Member.MemberUrl %>">
              <%# ((SocialFront.Entities.Image)Container.DataItem).Member.LoginName %>
            </a>
          </b>
        </p>
    </ItemTemplate>
    
    <EmptyDataTemplate>
        <p>No images have been uploaded yet.</p>
    </EmptyDataTemplate>

</asp:ListView>

<asp:DataPager runat="server" ID="ItemDataPager" PageSize="2" PagedControlID="lvImages" QueryStringField="p">
    <Fields>
      <asp:NumericPagerField />
    </Fields>
</asp:DataPager>